﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <title>登录测试</title>
    <link rel="stylesheet" href="/plugins/weui/css/weui.min.css" />
    <script src="/plugins/weui/js/zepto.min.js"></script>
    <script src="/static/h5/js/im.config.js"></script>
    <script src="/static/h5/js/im.js"></script>
    <script>        
        function logins() {
            var staffid = $("#staffid").val();
            var storeid = $("#storeid").val();
            var uid = $("#uid").val();
            $ajax.post(imConfig.apiDomain + imConfig.api.login, "openid=" + uid, function (res) {
                if (!isJsonSuccess(res)) return;

                setCookie("wjk_im", "uid=" + uid);
                toUrl("demo.html");
            });
        }
    </script>
</head>

<body>
    <h2>登录参数</h2>
    <div>staffId: <input type="text" id="staffid" value="1" /></div>
    <div>uid: &nbsp; <input type="text" id="uid" value="1001" /></div>
    <div>soreid: <input type="text" id="storeid" value="4" /></div>
    <div><input type="button" value=" 登 录 " onclick="logins()" /></div>
    <div class="weui-toptips weui-toptips_warn js_tooltips">错误提示</div>
</body>
</html>